#ifndef REGIST_H
#define REGIST_H

#include <QMessageBox>
#include <QDialog>

#include "sqlite.h"
#include "keyboard.h"
#include "thread.h"

namespace Ui {
class Regist;
}

class Regist : public QDialog
{
    Q_OBJECT

    enum Choose_t{
        NAME,
        ID,
        PASSWD,
        PHONE,
    };

public:
    explicit Regist(QWidget *parent = nullptr);
    ~Regist();


    KeyBoard *key;
    Choose_t choose = NAME;
    bool eventFilter(QObject *watched, QEvent *event);
    void mouseReleaseEvent(QMouseEvent *);
public slots:
    void deleteBtn_click();
private slots:
    void on_pushButton_2_clicked();

    void on_pushButton_clicked();
    void keyPress(QString ch);

private:
    Ui::Regist *ui;
};

#endif // REGIST_H
